import request from '@/config/axios'

// 数据分析API
export const AnalysisApi = {
  
  getAchievementUserPage: async (params: any) => {
    return await request.get({ url: `/crm/analysis-achievement/user`, params })
  },

  getAchievementDept: async (params: any) => {
    return await request.get({ url: `/crm/analysis-achievement/depts`, params })
  },


  getCustomerLevel: async () => {
    return await request.get({ url: `/crm/analysis-customer/level`})
  },

  
  getCustomerSource: async () => {
    return await request.get({ url: `/crm/analysis-customer/source`})
  },


  getCustomerIndustry: async () => {
    return await request.get({ url: `/crm/analysis-customer/industry`})
  },


  getCustomerVolume: async (params) => {
    return await request.get({ url: `/crm/analysis-customer/volume`, params })
  },

  getRecord: async (params) => {
    return await request.get({ url: `/crm/analysis-customer/record`, params })
  },
  getContractRank: async (params) => {
    return await request.get({ url: `/crm/analysis-rank/contract`, params })
  },
  getReceivablesRank: async (params) => {
    return await request.get({ url: `/crm/analysis-rank/receivables`, params })
  }
}